"""
元组tuple的使用示例
"""

user_tuple = ("Kevin", 89757, 173)
company_tuple = ("Google", ["Kevin"])

if __name__ == '__main__':
    # 元组拆包
    name, no, height = user_tuple
    print(name, no, height)
    name, *others = user_tuple
    print(name, others)

    # 元组中的可变对象还是可以进行修改的
    company_tuple[1].append("Zhao")
    print(company_tuple)

    # 将元组作为key值
    user_info_dict = dict()
    user_info_dict[user_tuple] = "个人信息"
    print(user_info_dict)
